/**
 * 〈〉
 *
 * @author 王青杰
 * @create 2018-08-0810:26
 * @since 1.0.0
 */
package org.wlgzs.website.wlgzsoffice.controller.sweep;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.wlgzs.website.wlgzsoffice.entity.TbDuty;
import org.wlgzs.website.wlgzsoffice.entity.TbSweep;
import org.wlgzs.website.wlgzsoffice.service.SweepService;
import org.wlgzs.website.wlgzsoffice.util.ResultMsg;

import javax.annotation.Resource;

@Controller
@RequestMapping("sweep/sweep")
public class SweepController {
    @Resource
    SweepService sweepService;
    @RequestMapping(value = "/insert",method = RequestMethod.POST)
    public ResultMsg insert(TbSweep sweep){
        return  sweepService.insert(sweep);
    }

    @RequestMapping(value = "/delete",method = RequestMethod.POST)
    public ResultMsg delete(int sweepId){
        return sweepService.delete(sweepId);
    }

    @RequestMapping(value = "/update",method = RequestMethod.POST)
    public ResultMsg update(TbSweep sweep){
        return  sweepService.update(sweep);
    }

    @RequestMapping(value = "/checkAll",method = RequestMethod.POST)
    public ResultMsg checkAll(int pageNum,TbSweep sweep){
        return sweepService.checkAll(pageNum,sweep);
    }

}
